package com.zjxny.jobs;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.zjxny.service.WxCpZjService;

import lombok.extern.slf4j.Slf4j;
import xyz.erupt.core.annotation.EruptHandlerNaming;
import xyz.erupt.job.handler.EruptJobHandler;

@Service
@Slf4j
@EruptHandlerNaming("企业微信会话刷新")
public class WxCpTokenRefreshJob implements EruptJobHandler{

	@Resource
	WxCpZjService wxCpZjService;
	
	@Override
	public String exec(String code, String param) {
		log.info("WxCpTokenRefreshJob.exec");
		wxCpZjService.refreshAppToken();
//		wxCpZjService.refreshTxlToken();
//		WxCpMessage message = WxCpMessage.TEXT().agentId(1000008).toUser("ChenShiTong").content("Hello World").build();
//		wxCpZjService.sendNotifyMessage("ChenShiTong","你好，测试中。。。");
		return null;
	}
}
